﻿using BLLDominar;
using Dominar.Modelos;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Dominar.Controllers
{
    [Authorize]
    public class DominioController : BaseController
    {
        public ActionResult Index()
        {
            MisDominiosModel model = new MisDominiosModel();
            model.Dominios = new BLLDominio().TraerDominios(User.Identity.Name);
            
            return View("Index", model);
        }

        public ActionResult Registrar()
        {
            BLLRegion bllRegion = new BLLRegion();
            RegistrarModel model = new RegistrarModel();
            model.Regiones = bllRegion.TraerRegiones();
            model.Costo = int.Parse(ConfigurationManager.AppSettings["TarifaActual"]);

            return View("Registrar", model);
        }
    }
}